﻿  
$.ajax({
    type: "POST",
    headers: { 'Content-Type': 'text/html; charset=UTF-8' },
    url: "https://validator.w3.org/nu/?out=json",
    data: document.body.innerHTML,
    dataType: "json",
    jsonp: "callback",

    success: function(data) {
         
        chrome.runtime.sendMessage({ sendMessage: data }, function (response) {
           console.log(JSON.stringify(response));
        });
         
    },
    error: function(textStatus) {
        console.error("Sorry, there was a connection error to the w3c Server! \nThe error message is: " + textStatus);
    }
});





 

  